package com.lch.designpattern.factory.simplefactory;

import com.lch.designpattern.factory.BMWCar;
import com.lch.designpattern.factory.BenzCar;
import com.lch.designpattern.factory.ICar;

/**
 * @author: liuchenhui
 * @create: 2019-04-14 19:59
 **/
public class CarFactoryTest {
    public static void main(String[] args) {
        ICar car = CarFactory.createCar(BMWCar.class);
        car.driveCar();
        car = CarFactory.createCar(BenzCar.class);
        car.driveCar();
    }
}